
#include "pt_bright.h"


static int pt_cur_bright = 90;
static int pt_last_bright = 90;
static int pt_scr_off_flag = 0;
static bool auto_brightness = 0;

int pt_bright_get(void)
{
    return pt_cur_bright;
}

int pt_bright_set(int val)
{
    pt_cur_bright = val;

    #ifdef PT_BK7258
    debug_d("pt_cur_bright=%d\n",pt_cur_bright);
    lcd_driver_backlight_set(pt_cur_bright);
    #endif

    return pt_cur_bright;
}

int pt_bright_get_min(void)
{
    return 0;
}

int pt_bright_get_max(void)
{
    return 100;
}


int pt_last_bright_get(void)
{
    return pt_last_bright;
}

int pt_last_bright_set(int val)
{
    pt_last_bright = val;

    return pt_last_bright;
}

int pt_scr_off_flag_get(void)
{
    return pt_scr_off_flag;
}

int pt_scr_off_flag_set(int val)
{
    pt_scr_off_flag = val;

    return pt_scr_off_flag;
}

bool set_auto_brightness(bool val)
{
    auto_brightness = val;
    return auto_brightness;
}

bool get_auto_brightness_status(void)
{
    return auto_brightness;
}
